﻿using System.ComponentModel.DataAnnotations;

namespace HelloWorld.Model
{
    // 设置校验的参数
    public class TestDTO
    {
        [Required]
        [StringLength(100, MinimumLength =3)]
        public string Name { get; set; }

        [Range(0, 100)]
        public decimal Price { get; set; }

        [RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*")]
        public string Category { get; set; }
    }
}
